﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;

using QLTTAN.BLL;
namespace QLTTAN.Form
{
    public partial class frmTimKiemHocVienTiemNang : DevExpress.XtraEditors.XtraForm
    {
        HocVienBLL HV_BLL;

        public List<DataRow> rowsHocVienSelected;

        public frmTimKiemHocVienTiemNang()
        {
            InitializeComponent();
        }

        private void frmTimKiemHocVienTiemNang_Load(object sender, EventArgs e)
        {
            HV_BLL = new HocVienBLL();

            rowsHocVienSelected = new List<DataRow>();

            try
            {
                gridCtrlHocVien.DataSource = HV_BLL.HocVien_LoadTiemNang();
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message, "Thông báo!!!", MessageBoxButtons.OK);
            }
        }

        private void btnChon_Click(object sender, EventArgs e)
        {
            foreach (int rowIndex in gridViewHocVien.GetSelectedRows())
            {
                rowsHocVienSelected.Add(gridViewHocVien.GetDataRow(rowIndex));
            }

            this.Close();
        }

        private void btnThoat_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        
    }
}